<me:UIWT x:Class="WPFExcelReport.TDWT15"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                      xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:TXT="clr-namespace:WPFExcelReport;assembly=TTXTIND"  
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIWT.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>   
        <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIWT.Resources>
    <Grid  >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition> 
        </Grid.RowDefinitions>
        <StackPanel>
            <WrapPanel>
                <TextBlock Text="{Binding WTBSRFNR}" FontSize="16"  />
                <TextBlock Text="{Binding INFO}" FontSize="16" Foreground="Red"/>
                <CheckBox Content="{Binding Source={Localization:Translate Word=停撬}}" IsChecked="{Binding REGULATOR,ElementName=TV}"
                          Visibility="{Binding IsJP, ElementName=TV,Converter={StaticResource nbv}}"/>
            </WrapPanel>
        </StackPanel>
       
        <DataGrid   Grid.Row="1"   Grid.Column="0"   
                   VerticalAlignment="Top"  
                    AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"   
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwDetail}}" 
                   IsSynchronizedWithCurrentItem="True" 
                   FontSize="14"
                   x:Name="dlgDetail"                    
                   RowDetailsVisibilityMode="Visible"  
                    >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=YENDS,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=头份}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=YARN,Converter={StaticResource gb2312}}" Header="{Binding Source={Localization:Translate Word=纱线}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y0}" Header="{Binding Source={Localization:Translate Word=Y1}}"   Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y1}" Header="{Binding Source={Localization:Translate Word=Y2}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y2}" Header="{Binding Source={Localization:Translate Word=Y3}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y3}" Header="{Binding Source={Localization:Translate Word=Y4}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y4}" Header="{Binding Source={Localization:Translate Word=Y5}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y5}" Header="{Binding Source={Localization:Translate Word=Y6}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y6}" Header="{Binding Source={Localization:Translate Word=Y7}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y7}" Header="{Binding Source={Localization:Translate Word=Y8}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y8}" Header="{Binding Source={Localization:Translate Word=Y9}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=Y9}" Header="{Binding Source={Localization:Translate Word=Y10}}"  Width="Auto" />
             </DataGrid.Columns>
        </DataGrid>

    </Grid>
</me:UIWT>

    
